package edu.sctu.wangfuxin.day20150520;

/**
 * Created by user06 on 2015/5/18.
 */
public class TextData {

    public TeaCher[] setData(TeaCher [] teacher){
/**
 * 对第一个老师赋值
 */
        TeaCher tea = new TeaCher();
        tea.name = "聂宇小狗";
        tea.age = 3;
        tea.kecheng = "java";
        tea.number = 1011001;
        tea.sex = "男";
        tea.zhicheng = "教授";

        StudentMassage[] ste = new StudentMassage[3];
        TextCourse[] tc = new TextCourse[3];
        TextCourse temp = new TextCourse();
        TextCourse temp1 = new TextCourse();
        TextCourse temp2 = new TextCourse();
        temp.course = "数学";
        tc[0] =temp;

        temp1.course = "计算机";
        tc[1] =temp1;

        temp2.course = "语文";
        tc[2] = temp2;

        for (int i = 0;i<3;i++){
            StudentMassage st1 = new StudentMassage();
            st1.name= "王大狗"+i;
            st1.age = 19+i;
            st1.number = 10000+i;
            st1.code = 59+i;
            st1.sex = "男";
            st1.loc = "火星";
            st1.courses = tc;

            ste[i] = st1;
        }
        tea.student = ste;
/**
 * 对第二个老师赋值
 */
        TeaCher tea1 = new TeaCher();
        tea1.name = "聂宇大狗";
        tea1.age = 30;
        tea1.kecheng = "计算机基础";
        tea1.number = 1011002;
        tea1.sex = "男";
        tea1.zhicheng = "讲师";
        StudentMassage[] ste1 = new StudentMassage[3];
        TextCourse[] tc1 = new TextCourse[3];
        TextCourse temp3 = new TextCourse();
        TextCourse temp4 = new TextCourse();
        TextCourse temp5 = new TextCourse();
        temp3.course = "物理";
        tc1[0] = temp3;

        temp4.course = "计算机";
        tc1[1] = temp4;

        temp5.course = "语文";
        tc1[2] = temp5;

        for (int i = 0;i<3;i++){
            StudentMassage st2 = new StudentMassage();
            st2.name = "王二狗"+i;
            st2.age = 19+i;
            st2.number = 10000+i;
            st2.code = 60+i;
            st2.sex = "男";
            st2.loc = "火星";
            st2.courses = tc1;
            ste1[i] = st2;
        }
        tea1.student = ste1;

/**
 * 对第三个老师赋值
 */
        TeaCher tea2 = new TeaCher();
        tea2.name = "聂宇巨狗";
        tea2.age = 30;
        tea2.kecheng = "英语";
        tea2.number = 1011003;
        tea2.sex = "男";
        tea2.zhicheng = "教授";
        StudentMassage[] ste2 = new StudentMassage[3];
        TextCourse[] tc2 = new TextCourse[3];
        TextCourse temp6 = new TextCourse();
        TextCourse temp7 = new TextCourse();
        TextCourse temp8 = new TextCourse();

        temp6.course = "数学";
        tc2[0] = temp6;

        temp7.course = "计算机";
        tc2[1] = temp7;

        temp8.course = "物理";
        tc2[2] = temp8;

        for (int i = 0;i<3;i++) {
            StudentMassage st3 = new StudentMassage();
            st3.name = "王三狗" + i;
            st3.age = 19 + i;
            st3.number = 10000 + i;
            st3.code = 59 + i;
            st3.sex = "男";
            st3.loc = "火星";
            st3.courses = tc2;
            ste2[i] = st3;
        }
        tea2.student = ste2;


        teacher[0]=tea;
        teacher[1]=tea1;
        teacher[2]=tea2;

        return  teacher;
    }


}
